package com.huang.service.impl;

import com.huang.dao.ChinaTotalDao;
import com.huang.domain.ChinaTotal;
import com.huang.service.ChinaTotalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ChinaTotalServiceImpl implements ChinaTotalService {

    @Autowired
    private ChinaTotalDao chinaTotalDao;
    @Override
    public void add(ChinaTotal c) {
        chinaTotalDao.insert(c);
    }

    @Override
    public ChinaTotal findAll() {
        return chinaTotalDao.selectByPrimaryKey(1);
    }

    @Override
    public void update(ChinaTotal c) {
        chinaTotalDao.updateByPrimaryKey(c);
    }

    @Override
    public boolean isNotNull() {
        return chinaTotalDao.selectByPrimaryKey(1)!=null;

    }
}
